import {pcaTextArr} from 'element-china-area-data'


const state = {
  china_area_data: pcaTextArr
}

const mutations = {
  set_dict_type(state, {type, list = []}) {
    state[type] = list
  },
  clear_dict_type(state) {
    state = {}
  }
}

const actions = {
  setDictType({ commit }, data) {
    commit('set_dict_type', data)
  },
  cleanDictType({commit}) {
    commit('clear_dict_type')
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
